package com.nuoniu.sibanyun.entity.production;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.nuoniu.sibanyun.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * <p>
 * mrp运算方案
 * </p>
 *
 * @author 小啊刚
 * @since 2021-03-16
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ma_mrp_inter_version")
@ApiModel(value="ErpMrpProgramme对象", description="mrp运算方案")
public class ErpMrpProgramme extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "账套id")
    @TableField("account_id")
    private Integer accountId;

    @ApiModelProperty(value = "公司id")
    @TableField("company_id")
    private Integer companyId;

    @ApiModelProperty(value = "方案编码")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "方案名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "方案描述")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "结果合并规则1:不合并2:物料3:物料+来源号4:物料+来源号+行号")
    @TableField("merge_type")
    private Integer mergeType;

    @ApiModelProperty(value = "是否系统方案")
    private Integer isSystem;

//    @ApiModelProperty(value = "业务计划id")
//    private Integer bussessPlanId;
//
//    @ApiModelProperty(value = "业务计划名称")
//    private String bussessPlan;

    @ApiModelProperty(value = "是否考虑损耗率0:否1:是")
    @TableField("loss_rate")
    private Boolean lossRate;

    @ApiModelProperty(value = "是否考虑现有库存0:否1:是")
    @TableField("is_exist_inventory")
    private Boolean isExistInventory;

    @ApiModelProperty(value = "是否考虑成品率0:否1:是")
    @TableField("is_finish_product_rate")
    private Boolean isFinishProductRate;

    @ApiModelProperty(value = "是否考虑安全库存0:否1:是")
    @TableField("is_safe_inventory")
    private Boolean isSafeInventory;

    @ApiModelProperty(value = "是否考虑预计入库数量和分配数量0:否1:是")
    @TableField("is_warehouse_distribution_quantity")
    private Boolean isWarehouseDistributionQuantity;

    @ApiModelProperty(value = "是否考虑订货策略和批量调整0:否1:是")
    @TableField("is_order_policy_batch")
    private Boolean isOrderPolicyBatch;

    @ApiModelProperty(value = "参与运行的仓库")
    @TableField("warehouse_ids")
    private String warehouseIds;

    @ApiModelProperty(value = "运算数据列表")
    @TableField(exist = false)
    List<ErpMrpRecord> mrpData;
}
